<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>跳动的心</title>
</head>

<body>
    <div class="heart">
    </div>
</body>

<style>
    * {
        margin: 0;
        padding: 0;
    }

    html,
    body {
        height: 100%;
        width: 100%;
        background-color: pink
    }

    body {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .heart {
        width: 200px;
        height: 200px;
        background: red;
        position: relative;
        transform: rotate(45deg);
        box-shadow: 0 0 30px red;
        animation: heartbit 1s alternate infinite;
    }

    .heart::before {
        content: '';
        width: 200px;
        height: 100px;
        background: red;
        position: absolute;
        left: 0;
        top: -99px;
        border-radius: 100px 100px 0 0;
        box-shadow: 0 0 30px red;
    }

    .heart::after {
        content: '';
        width: 100px;
        height: 200px;
        background: red;
        position: absolute;
        left: -99px;
        top: 0;
        border-radius: 100px 0 0 100px;
        box-shadow: 0 0 30px red;
    }

    @keyframes heartbit {
        0% {
            transform: rotate(45deg)  scale(0.6);
        }

        100% {
            transform: rotate(45deg) scale(1.4);
        }
    }
</style>

</html>